/*
 * Copyright 2003-2007 (c) Live Media Pty Ltd. <argot@einet.com.au> 
 *
 * This software is licensed under the Argot Public License 
 * which may be found in the file LICENSE distributed 
 * with this software.
 *
 * More information about this license can be found at
 * http://www.einet.com.au/License
 * 
 * The Developer of this software is Live Media Pty Ltd,
 * PO Box 4591, Melbourne 3001, Australia.  The license is subject 
 * to the law of Victoria, Australia, and subject to exclusive 
 * jurisdiction of the Victorian courts.
 */

package com.colony.mime;

import java.io.*;
import java.util.*;

/**
 *  The Pipe class provides a single class which acts as a Pipe between two threads.
 *  It returns an MimeInputStream and MimeOutputStream for each side of the Pipe.  
 *  The Mime streams offer additional methods to support
 */
public class MimeOutputSink
extends MimeOutputStream
{
   private OutputStream _output;

   public MimeOutputSink( OutputStream output )
   {
      _output = output;
   }

   public MimeOutputSink( OutputStream output, HashMap headers )
   {
      super( headers );
      _output = output;
   }

	public MimeOutputSink( OutputStream output, MimeOutputStream headers )
	{
		super( headers.hashTable() );
		_output = output;
	}


   public void write( int b )
      throws IOException
   {
      _output.write( b );
   }

   public void write(byte[] b)
      throws IOException
   {
      _output.write( b );
   }

   public void write(byte[] b, int off, int len)
      throws IOException
   {
      _output.write( b, off, len );
   }

   public void flush()
      throws IOException
   {
      _output.flush();
   }

   public void close()
      throws IOException
   {
      _output.close();
   }

   public void setError( Throwable error )
      throws IOException
   {
      throw new IOException( "not implemented" );
   }

}
